import { PORT1 } from "@/api/config/servicePort";
import http from "@/api";

/**
 * 查询菜单
 * @param params
 * @returns
 */
export const loadSimpleList = () => {
  return http.get<Menu.MenuOptions[]>(PORT1 + `/system/sys-menu/simple-list`);
};
/**
 * 添加菜单
 */
export const saveMenu = (params: Menu.MenuOptions) => {
  return http.post<Boolean>(PORT1 + `/system/sys-menu/save  `, params);
};
/**
 * 修改菜单
 */
export const updateMenu = (params: Menu.MenuOptions) => {
  return http.put<Boolean>(PORT1 + `/system/sys-menu/update  `, params);
};

/**
 * 删除菜单
 */
export const deleteMenu = (menuId: number) => {
  return http.delete<Boolean>(PORT1 + `/system/sys-menu/delete/${menuId}`);
};
